<%@page import="RssEasy.Core.DateTimeExtend"%>
<%@page import="Model.BusinessClass.BusinessClassList"%>
<%@page import="qqt.industry_list.IndustryList"%>
<%@page import="RssEasy.Core.CookieHelper"%>
<%@page import="Model.Supplier.SupplierExcellentView"%>
<%@page import="Model.Purchase.PurchaseList"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%
    CookieHelper cookie = new CookieHelper(request, response);
    if (cookie.Get("account") == null) {
        response.sendRedirect("/login/login");
        response.flushBuffer();
    }
    if (cookie.Get("account") == "") {
        response.sendRedirect("/login/login");
        response.flushBuffer();
    }
    PurchaseList pl = new PurchaseList(pageContext);
    SupplierExcellentView sev = new SupplierExcellentView(pageContext);
    IndustryList il = new IndustryList(pageContext);

%>  
<!DOCTYPE html>
<html>
    <head>
        <title>寻源发布</title>
        <meta charset="utf-8" />
        <meta http-equiv="X-UA -Compatible" content="IE=edge">
        <meta name="description" content="这里写网站内容描述" />
        <meta name="keywords" content="这里写关键词" />
        <meta name="Robots" contect="all">
        <link href="/css/reset.css" rel="stylesheet" type="text/css"/>
        <link href="/inc/head.css" rel="stylesheet" type="text/css"/>
        <link href="/inc/footer.css" rel="stylesheet" type="text/css"/>
        <link href="/purchase/css/create.css" rel="stylesheet" type="text/css"/>
        <link href="/css/swfupload.css" rel="stylesheet" type="text/css"/>
        <link href="/source/css/create.css" rel="stylesheet" type="text/css"/>
        <link href="/wdatepicker/skin/default/datepicker.css" rel="stylesheet" type="text/css"/>
        <link href="/purchase/css/alert.css" rel="stylesheet" type="text/css"/>
    </head>
    <body id="xunyuan">
        <%@include file="/inc/head.jsp" %>
        <div class="purchase_create_position w1000">当前位置: 首页＞自主发布寻源</div>
        <div class="purchase_create_content w1000" id="source_create_content">
            <div class="purchase_create_title w1000">寻源发布</div>
            <div class="purchase_create_right1">
                <h1>最新发布</h1>
                <ol>
                    <%
                        pl.request();
                        pl.pagesize = 5;
                        pl.select().where("state=1 and typid=2").get_page_desc("id");
                        while (pl.for_in_rows()) {
                    %>
                    <li><img src="/purchase/img/purchase_create_list1.jpg" alt=""/><a href='/source/details/<%=pl.get("id")%>' target="blank" title="<%=pl.get("name")%>"><%=pl.get("name")%></a><span rssdate='<%=pl.get("shijian")%>,yyyy-MM-dd'></span></li>
                            <%
                                }
                            %>
                </ol>
            </div>
            <form id="create_form" method="get" action="/source/create_back">
                <div class="purchase_create_form1">
                    <h1>项目类别：</h1><span class="c1 selectd" value="6">材料</span><span class="c2" value="7">设备</span><span class="c3" value="8">劳务</span><br>
                    <input type="hidden" name="purchase_class" id="purchase_class" value="6">
                    <h1>产品类别：</h1><select id="product1" name="product1"><option>请选择</option>
                        <%
                            BusinessClassList bcl = new BusinessClassList(pageContext);
                            bcl.select("category,id").where("parentid=0").query();
                            while (bcl.for_in_rows()) {
                        %>
                        <option value="<%=bcl.get("id")%>"><%=bcl.get("category")%></option>
                        <%
                            }
                        %> 
                    </select><select id="product2" name="product2"><option>请选择</option></select><br>
                    <div id="mainClass"></div>
                    <h2>项目名称：</h2><input type="text" id="name" name="name" placeholder="输入项目名称" maxlength="20"><label for="name"></label><br>
                    <h2>截止时间：</h2><input type="text" id="indate" class="Wdate" onFocus="WdatePicker({lang: 'zh-cn', dateFmt: 'yyyy-MM-dd'})" name='enddt' readonly placeholder="点击选择日期和时间"><button type="button" class="ti">长期有效</button><br>
                    <h3>图片/文件上传：</h3>
                    <div class="source_imgupload">
                        <ul id="icourlwrap" class="swfuploadwrap">
                            <li><div class="swfuploadimg"><div><img src="/img/white.gif"></div></div></li>
                        </ul>
                        <div>
                            <span swfupload="icourlswf" config="{multimode:0,fileType: [['图形图像(*.jpg;*.png;*jpeg;*gif)','*.jpg;*.png;*jpeg'],['shipin(*.doc;*.pdf;*.ppt;)','*.doc;*.pdf;*.ppt;']]}"></span>
                            <br/>
                            宽度建议在：480~640之间
                        </div>
                    </div>
                    <input type="hidden" name="attachurl" value="">
                    <h3>供应商资质要求：</h3><textarea class='conditions' name="conditions" placeholder="输入资质要求"></textarea><br>
                    <h3>内容公告：</h3><textarea class='detail' name="summary" placeholder="输入项目内容"></textarea>
                </div>
                <div class="purchase_create_right2">
                    <h1>优秀供应商排行榜</h1>
                    <ol>
                        <%
                            sev.request();
                            sev.pagesize = 10;
                            sev.select().get_page_desc("rank");
                            int n = 1;
                            while (sev.for_in_rows()) {
                        %>
                        <li><div class="purchase_create_right2_color<%out.print(n);%>"><%out.print(n);%></div><a href="/supplier/home/<%=sev.get("myid")%>" title="<%=sev.get("corpname")%>"><%=sev.get("corpname")%></a></li>
                                <%
                                        n += 1;
                                    }
                                %>
                    </ol>
                </div>
                <input type="button" class="create_butn" value="发布">
            </form>
        </div> 
        <%@include file="/inc/footer.jsp"%>
        <%@include file="/inc/js_all.html"%>
        <script src="/purchase/js/alert.js" type="text/javascript"></script>
        <script src="/purchase/js/creat.js" type="text/javascript"></script>
        <script src="/source/js/upload.js" type="text/javascript"></script>
        <script src="/wdatepicker/WdatePicker.js" type="text/javascript"></script>
    </body>
</html>
